import http from '@/services/http';

export function getFilterList() {
  return http.get<Requestor.Response<Requestor.FilterResponse[]>>(
    '/api/admin/AdminUserBase/filter/list',
  );
}

export function getList<T>(params: UserManagementApi.ListParams) {
  return http.post<Requestor.ListResponse<T>>('/api/admin/AdminUserBase/list', {
    data: params,
  });
}
export function getInfo<T>(params: UserManagementApi.InfoParams) {
  return http.get<Requestor.Response<T>>('/api/admin/AdminUserBase/get/info', {
    params,
  });
}
export function create(params: UserManagementApi.CreateParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/AdminUserBase/create', {
    data: params,
  });
}
export function update(params: UserManagementApi.UpdateParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/AdminUserBase/update', {
    data: params,
  });
}
export function remove(params: UserManagementApi.DeleteParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/AdminUserBase/delete', {
    data: params,
  });
}
export function updatePassword(params: UserManagementApi.PasswordParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/AdminUserBase/update/password', {
    data: params,
  });
}
export function updateStatus(params: UserManagementApi.StatusParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/AdminUserBase/update/Status', {
    data: params,
  });
}
